package cn.example.vip.mall.user.feign;

import cn.example.vip.mall.user.entity.Address;
import cn.example.vip.mall.util.RespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "mall-user", path = "/address", contextId = "mall-user-info-address")
public interface AddressFeign {
	
	/**
	 * 查询用户地址
	 */
	@GetMapping("/list")
	RespResult<List<Address>> address();
	
	/**
	 * 查询用户地址
	 */
	@GetMapping("/list/{userName}")
	RespResult<List<Address>> addressByUserName(@PathVariable("userName") String userName);
}
